<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.List" %>
<%@ page import="model.SuShe"%>
<%@ page import="dao.SuSheDao"%>  
    
        <%
	//检查会话中是否有 "admin" 属性
	Object fdyObj = session.getAttribute("admin");
	if (fdyObj == null) {
	    response.sendRedirect("Login.jsp");
	    return;
	}
%>   
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>管理员页面</title>
<link href="../css/Utils.css" rel="stylesheet" type="text/css" />
<link href="../css/List.css" rel="stylesheet" type="text/css" />
<!-- 退出登录专用 -->
    <script type="text/javascript" src="Loginout.js"></script>
</head>
<body>

<!-- 头部 -->
<div class="header"><br>
<nerong>&nbsp;&nbsp;管理员页面&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;</nerong>

 <button onclick="confirmLogout('<%= (String)session.getAttribute("admin") %>','admin')">退出登录</button>

</div><br>

<div class="left" >
<table width="80%" height="80%">
<th>
<nerong>管理员可选择内容</nerong>

</th>

<tr>
<td>
<a href="../View_Msg/msgAdmin.jsp">&emsp;个人信息</a><br>
</td>
</tr>

<tr>
<td>
<a href="../View_xx/XxStudent.jsp">&emsp;学生信息管理</a><br>
</td>
</tr>


<tr>
<td>
<a href="../View_xx/XxFdy.jsp">&emsp;辅导员信息管理</a><br>
</td>
</tr>

<tr>
<td>
<a href="../View_xx/XxSuGuan.jsp">&emsp;宿管信息管理</a><br>
</td>
</tr>


<tr>
<td>
<a href = "../View_xx/XxWy.jsp">&emsp;物业信息管理</a><br>
</td>
</tr>

<tr>
<td>
<a href = "../View_SuShe/SuSheAdminMain.jsp">&emsp;宿舍入住管理</a><br>
</td>
</tr>






</table>


</div>



<div class="context" >
<!-- 这部分是每个大功能的小功能 -->
<%
String number = request.getParameter("number");
String roomid = request.getParameter("roomid");
String id = request.getParameter("id");
String name = request.getParameter("name");
String classname = request.getParameter("classname");
%>

<h2>修改宿舍入住人员信息</h2>
<form action="../U_Admin_SuSheServlet" method="post"> 
<!-- /隐藏旧信息用来查询 -->
<input hidden="hidden" type="text" name="oldroomid" value="<%= roomid %>" > <br>
<input hidden="hidden" type="text" name="oldid" value="<%= id %>" ><br> 
<!-- /新信息信息用来修改 -->
<div class="form-group">
<label for="roomid">宿舍号</label>
<input type="text" id="roomid" name="roomid" value="<%= roomid %>" readonly>
</div> 
<div class="form-group">
<label for="id">学生id</label>
<input type="text" id="id" name="id" value="<%= id %>">
</div>
<div class="form-group">
<label for="name">学生姓名</label>
<input type="text" id="name" name="name" value="<%= name %>">
</div>
<div class="form-group">
<label for="classroom">学生班级</label>
<input type="text" id="class" name="classroom" value="<%= classname %>">
</div>
<div class="form-buttons">
<button type="submit" name="action" value="update">确认修改</button>
<button type="button" onclick="window.location.href='SuSheAdminMain.jsp'">取消修改</button>
</div>
</form>
</div>

</body>
</html>